﻿using System;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using UnityEngine;
using XLua;
using Yoozoo.Framework.Core;

namespace Gameplay.PVE.Survivor
{
    public class HeroBubbleEventConfig
    {
        public int id;
        public int type;
        public float cd;
        public float probability;
        public List<float> param;
    }

    public partial class BattleConfigManager
    {
        private Dictionary<int, HeroBubbleEventConfig> heroBubbleEventConfig;

        public HeroBubbleEventConfig GetHeroBubbleEventConfig(int id)
        {
            if (heroBubbleEventConfig.TryGetValue(id, out var config))
            {
                return config;
            }

            UnityEngine.Debug.LogError("技能配置找不到" + id);
            return null;
        }

        public static void PreloadHeroBubbleEventConfig(LuaTable table)
        {
            PveUtils.PreloadRpgConfig(table, ref Instance.heroBubbleEventConfig);
        }
    }
}